<template>
  <div>
    <div class="Logout">
      <Logout>退出</Logout>
    </div>
    <h1>查询催费信息</h1>
    <!-- <el-input size="medium" v-model="search_cno" placeholder="请输入课程编号"></el-input>
    <el-button @click="search()" icon="el-icon-search" circle></el-button> -->
    <el-table
      :data="tableData"
      border
      style="width:100%">
      <el-table-column
        fixed
        prop="sno"
        label="学生编号"
        width="150">
      </el-table-column>
      <el-table-column
        prop="cno"
        label="课程编号"
        width="120">
      </el-table-column>
      <el-table-column
        prop="adate"
        label="选课日期"
        width="120">
      </el-table-column>
      <el-table-column
        prop="aclass"
        label="班级编号"
        width="120">
      </el-table-column>
      <el-table-column
          prop="aamount"
          label="已缴费金额"
          width="120">
      </el-table-column>
      <el-table-column
        prop="func"
        label="操作"
        width="150">
        <template slot-scope="scope" v-if="(scope.row).aamount.length === 0">
          <el-button @click="cuishou(scope.row)" type="text" size="small">催收</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import Logout from "./Logout";
export default {
  name: "FindMoney",
  components:{Logout},
  data() {
    return {
      stuNo:'',
      tableData:null
    }
  },
  created(){
    const  _this = this;
    this.$axios.post(`/FindAmount`).then((res) => {
      //console.log(res.data);
      console.log("aamount:", res.data.aamount)
      _this.tableData = res.data;
    })
  },
  methods:{
    cuishou(row){

        alert(`已向学号为${row.sno}的学生催收学费`);

    }
  }
}
</script>

<style scoped>

</style>
